import { defineStore } from 'pinia'
import {reqGetYanXuanIndexData} from '../api/api1'
export const useCounterStore = defineStore('counter', {
  state: () => {
    return { 
      count: 999 ,
      yanxuanIndexData:{}
    }
  },
  actions: {
    increment() {
      this.count++
    },
    async getYanXuanIndexData(){
      const res = await reqGetYanXuanIndexData()
      console.log('pinia',res.data)
      this.yanxuanIndexData = res.data
    }
  },
})